<!DOCTYPE html>
<html>
  <head>
  	<div th:include="base-libs :: base-libs" />
    <title>预约优先级类别</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    
    <script>
	    $(function(){
			initView();
			initData();
		})
		
		function initView(){
	    	//确定
	    	$("#btnQd").click(function(){
	    		var selectOption = $("#lbSelect>option:selected");
	    		var YYLBBM = selectOption.val();
	    		if(StringUtils.isEmpty(YYLBBM)){
	    			$.QuickAlert.alertFail({content: '请选择需要添加的预约类别！'});
	    		}else{
		    		var params = {
		    			YYLBBM: YYLBBM,
		    			YYLBMC: selectOption.text()
		    		}
		    		//alert(JSON.stringify(params))
	    			StoreCache.setCache('yylbData', params);
		    		$("#btnQx").trigger("click");
	    		}
	    	})
	    	
	    	//取消
	    	$("#btnQx").click(function(){
	    		parent.layer.closeAll();
	    	})
	    }
	    
		function initData(){
			//已经选择的预约类别编码--禁用
	    	var selectedYylbData = StoreCache.removeCache('selectedYylbData');
			if(!$.isEmptyObject(selectedYylbData)){
				$.each(selectedYylbData, function(){
					$('[value='+ this +']').attr("disabled","disabled");
				})
			}
	    }
    </script>
  </head>
  
  <body>
    <div class="easyui-layout" fit="true" border="false">
		<div region="center" style="text-align:center;padding-top:10px;" border="false">
			<span>类别：</span>
			<select id="lbSelect">
				<option value="">请选择</option>
				<option value="qianYue">签约</option>
				<option value="shuangZhuan">双转</option>
				<option value="menZhen">门诊</option>
				<option value="zhuYuan">住院</option>
			</select>
		</div>
		<div region="south" style="height:40px;line-height:40px;text-align:center;overflow:hidden;border:0;border-top:1px solid #ddd">
			<button id="btnQd" class="btn btn-info" type="button">确认</button>
    		<button id="btnQx" class="btn btn-info" type="button">取消</button>
		</div>
	</div>
  </body>
</html>
